package Service.impl;

import Service.IProductService;
import Service.IProvinceService;
import dao.IProvinceDao;
import dao.impl.ProvinceDaoImpl;
import pojo.Product;
import pojo.Province;

import java.util.List;

public class ProvinceServiceImpl implements IProvinceService {
    private IProvinceDao provinceDao=new ProvinceDaoImpl();

    @Override
    public void addProvince(Province province) {
        provinceDao.addProvince(province);
    }

    @Override
    public void updateProvince(Province province) {
        provinceDao.updateProvince(province);
    }

    @Override
    public void deleteProvince(int id) {
        provinceDao.deleteProvince(id);
    }

    @Override
    public List<Province> findAll() {
        return provinceDao.findAll();
    }

    @Override
    public Province findById(int id) {
        return provinceDao.findById(id);
    }

    @Override
    public Province findByProvinceName(String name) {
        return provinceDao.findByProvinceName(name);
    }
}
